﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data;

namespace ltModel.BLL
{
    /// <summary>
    ///我要捐赠或我要求助 的摘要说明
    /// </summary>
    public class juanzeng
    {
        //
        //TODO: 在此处添加构造函数逻辑
        //
        private readonly ltModel.DAL.juanzeng dal = new ltModel.DAL.juanzeng();
        public juanzeng()
        { }
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int id)
        {
            return dal.Exists(id);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(ltModel.Model.juanzeng model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(ltModel.Model.juanzeng model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 修改点击量
        /// </summary>
        /// <param name="id">ID</param>
        /// <returns></returns>
        public bool UpdateHits(int id)
        {
            return dal.UpdateHits(id);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int id)
        {
            return dal.Delete(id);
        }

        /// <summary>
        /// 删除数据
        /// <param name="ids">ID</param>
        /// </summary>
        public bool Delete(string ids)
        {
            return dal.Delete(ids);
        }

        /// <summary>
        /// 审核消审操作
        /// </summary>
        /// <param name="ids">ID</param>
        /// <param name="zt">状态</param>
        /// <returns></returns>
        public bool UpdateZT(string ids, string zt)
        {
            return dal.UpdateZT(ids,zt);
        }

        /// <summary>
        /// 公开取消公开操作
        /// </summary>
        /// <param name="ids">ID</param>
        /// <param name="zt">状态</param>
        /// <returns></returns>
        public bool UpdatePublic(string ids, string zt)
        {
            return dal.UpdatePublic(ids, zt);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ltModel.Model.juanzeng GetModel(int id)
        {
            return dal.GetModel(id);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }
        /// <summary>
        /// 获得数据列表
        /// <param name="TopNum">记录数</param>
        /// <param name="strWhere">条件</param>
        /// </summary>
        public DataSet GetList(string TopNum, string strWhere)
        {
            return dal.GetList(TopNum, strWhere);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetAllList()
        {
            return dal.GetList("");
        }
        #endregion
    }
}